-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration from the drand v1.5 codebase to its own repo #2
Conversation
Signed-off-by: Yolan Romailler <[email protected]>
Signed-off-by: Yolan Romailler <[email protected]>
Signed-off-by: Yolan Romailler <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first round of comments - have already lost the will to live
|
||
// Wrap provides a single entrypoint for wrapping a concrete client | ||
// implementation with configured aggregation, caching, and retry logic | ||
func Wrap(ctx context.Context, l log.Logger, clients []client.Client, options ...Option) (client.Client, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo it's worth adding another convenience constructor that takes []string
addresses and just builds a verifying, speedtesting HTTP client for noobs to use
if rr.err != nil { | ||
oc.log.Infow("", "optimizing_client", "endpoint down when speed tested", "client", fmt.Sprintf("%s", rr.client), "err", rr.err) | ||
} | ||
stats = append(stats, rr.stat) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think rr
could be nil in some scenarios here, particularly on a context closing downstream
and moving grpc client to internals
now examples are provided using the Go test framework in the example_test.go files
Using the in-memory one instead
Now with tests passing and relay seemingly working locally.